/*
共享模块，引入各个routes模块的需要的模块，统一exports
如引入第三方ui模块，必须在模块中exports
*/
import { NgModule, Type } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule } from '@angular/router';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { MappingPipe } from '@share/pipe/mapping.pipe';
import { DictPipe } from '@share/pipe/dict.pipe';
import { ModifyPipe } from '@share/pipe/modify.pipe';
import { SHARED_ZORRO_MODULES } from './shared-zorro.module';
import { ResetPasswordComponent } from './component/reset-password/reset-password.component';
import { ExceptionComponent } from './component/exception/exception.component';
import { SafeHtmlPipe } from './pipe/safe-html.pipe';

/* 注册共享的组件,指令和管道 */
const COMPONENTS: Type<any>[] = [
	ResetPasswordComponent,
	ExceptionComponent
];
const DIRECTIVES: Type<any>[] = [

];
const PIPES: Type<any>[] = [
	MappingPipe,
	DictPipe,
	ModifyPipe,
	SafeHtmlPipe
];

@NgModule({
	imports: [
		CommonModule,
		RouterModule,
		FormsModule,
		ReactiveFormsModule,
		...SHARED_ZORRO_MODULES
	],
	exports: [
		CommonModule,
		FormsModule,
		ReactiveFormsModule,
		...COMPONENTS,
		...DIRECTIVES,
		...PIPES,
		...SHARED_ZORRO_MODULES
	],
	declarations: [
		...COMPONENTS,
		...DIRECTIVES,
		...PIPES
	]
})
export class ShareModule {
}



